class HealthRecordEntity {
  final int? total;
  List<HealthRecordInfo>? rows;

  HealthRecordEntity({this.rows, this.total});

  factory HealthRecordEntity.fromJson(Map<String, dynamic> json) {
    final originList = json['rows'] as List?;
    List<HealthRecordInfo> protocolList =
        (originList??[]).map((value) => HealthRecordInfo.fromJson(value)).toList();
    return HealthRecordEntity(rows: protocolList, total: json['total']);
  }
}

class HealthRecordInfo {
  String? roomNumber;
  String? customerName;
  int? id;
  String? collectionTime;
  bool? isExpanded;
  String? remark;
  num? height;
  num? weight;
  num? oxygen;
  num? pulseRate;
  num? heart;
  num? temperature;
  num? high;
  num? low;
  num? breathe;
  num? bowelsNum;
  num? bloodSugarBeforeBreakfast;
  num? bloodSugarLastBreakfast;
  num? bloodSugarBeforeLunch;
  num? bloodSugarLastLunch;
  num? bloodSugarBeforeDinner;
  num? bloodSugarLastDinner;
  num? bloodSugarBeforeSleep;
  num? bloodSugarLastOther;

  HealthRecordInfo({
    this.roomNumber,
    this.customerName,
    this.id,
    this.collectionTime,
    this.remark,
    this.isExpanded,
    this.height,
    this.weight,
    this.oxygen,
    this.pulseRate,
    this.temperature,
    this.heart,
    this.high,
    this.low,
    this.breathe,
    this.bowelsNum,
    this.bloodSugarBeforeBreakfast,
    this.bloodSugarLastBreakfast,
    this.bloodSugarBeforeLunch,
    this.bloodSugarLastLunch,
    this.bloodSugarBeforeDinner,
    this.bloodSugarLastDinner,
    this.bloodSugarBeforeSleep,
    this.bloodSugarLastOther,
  });

  HealthRecordInfo.fromJson(Map data) {
    roomNumber = data['roomNumber'];
    customerName = data['customerName'];
    id = data['id'];
    collectionTime = data['collectionTime'];
    isExpanded = data['isExpanded'] ?? false;
    remark = data['remark'];
    height = data['height'];
    weight = data['weight'];
    oxygen = data['oxygen'];
    pulseRate = data['pulseRate'];
    temperature = data['temperature'];
    high = data['high'];
    low = data['low'];
    breathe = data['breathe'];
    heart = data['heart'];
    bowelsNum = data['bowelsNum'];
    bloodSugarBeforeBreakfast = data['bloodSugarBeforeBreakfast'];
    bloodSugarLastBreakfast = data['bloodSugarLastBreakfast'];
    bloodSugarBeforeLunch = data['bloodSugarBeforeLunch'];
    bloodSugarLastLunch = data['bloodSugarLastLunch'];
    bloodSugarBeforeDinner = data['bloodSugarBeforeDinner'];
    bloodSugarLastDinner = data['bloodSugarLastDinner'];
    bloodSugarBeforeSleep = data['bloodSugarBeforeSleep'];
    bloodSugarLastOther = data['bloodSugarLastOther'];
  }
}
